home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 10 - 1994 / 10.09 Sep 94 / Fez (MacHack Winner) / FezEdit ƒ / FEZ.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-20  |  1.6 KB  |  50 lines  |  [TEXT/MMCC]

  1. /*
  2.  *    FEZ.h
  3.  *
  4.  *    Interface definitions for the FEZ package.
  5.  */
  6.  
  7. #include <math.h>
  8.  
  9. #define MAXPATH                32
  10. #define SCROLLBARWIDTH        16
  11. #define MAXQUEUE            32
  12.  
  13. // Simple 2-D integer coordinates (for rectangles in the vertical plane)
  14.  
  15. typedef struct { short x; short y; } Point2D;
  16.  
  17. // Information about the start and end of a general zoom
  18.  
  19. typedef struct {
  20.  
  21.     /* Caller fills these in */
  22.     Rect frame;                    // Global and/or local coordinates w/r/t its window
  23.     WindowPtr win;                // Its window
  24.     short thickness;            // of rectangle lines, normally 1
  25.     
  26.     /* Fez routines use these internally */
  27.     short zoomStyle;            // Type of zoom to use (theWindow only)
  28.     short opening;                // Same as opening parameter in NewZoom (theWindow only)
  29.     short isHidden;                // Widget visibility flag: used for widget frame only
  30.     RgnHandle clip;                // Visible desktop in front of and including this window
  31.     Point2D knot;                // Where zoom path should pass through zoom
  32.     Point2D c0;                    // Control points for next segment of spline
  33.     Point2D c1;
  34.     
  35.     } ZoomFrame, **ZoomFrameHandle;
  36.  
  37.  
  38. /* Prototypes */
  39.  
  40. ZoomFrameHandle    NewZoom(ZoomFrame *theWidget, ZoomFrame *theWindow, int opening, int zoomStyle);
  41. void            FrameEvadingZoom(ZoomFrameHandle zoomArray, short speed, short qSize);
  42. void            DisposeZoom(ZoomFrameHandle zoomArray);
  43. void            ZoomCenterRect(Rect *smallRect, Rect *bigRect, short thick, short speed, short qMax);
  44. void            ComputeBezierPath(Point2D *p0, Point2D *c1, Point2D *c2, Point2D *p3, Point2D *path, short numPoints);
  45. void            DrawBezierPath(Point2D *path, short numPoints);
  46.  
  47. void            SingleSplineZoom(ZoomFrame *start, ZoomFrame *end, int opening);
  48. void            MultipleSplineZoom(ZoomFrameHandle zoomArray, int opening);
  49.  
  50.